import Request from '@/js_sdk/pocky-request/pocky-request v.2.0.4/index.js'
//接口封装在这里

// 兑换商品列表
export async function getExchangeList() {
	return Request().request({
		url: '/exchange/all',
		method: 'get'
	});
}
// 兑换商品列表
export async function getExchangeDetail(id) {
	return Request().request({
		url: '/exchange/show/' + id,
		method: 'get',
	});
}
// 微信登录
export async function wechatLogin(data) {
	return Request().request({
		url: '/socials/wechat/authorizations',
		method: 'post',
		data
	});
}
// 拉取用户信息
export async function getUserInfo() {
	return Request().request({
		url: '/user',
		method: 'get'
	});
}
// 我的预约列表
export async function getSubscribeInfo() {
	return Request().request({
		url: '/user/make',
		method: 'get'
	});
}
// 我的邀请
export async function getInviteInfo() {
	return Request().request({
		url: '/user/invite',
		method: 'get'
	});
}
// 兑换商品分类
export async function getExchangeType(id) {
	return Request().request({
		url: '/exchange/list/' + id,
		method: 'get',
	});
}
// 提现记录
export async function getchargelist(month) {
	return Request().request({
		url: '/user/bill/' + month,
		method: 'get'
	});
}
// 兑换商品
export async function exchangeGoods(id) {
	return Request().request({
		url: '/exchange/conversion/' + id,
		method: 'get',
	});
}
// 兑换页轮播图
export async function getBanner() {
	return Request().request({
		url: '/exchange/banner',
		method: 'get'
	});
}
// 收货地址
export async function getAddress() {
	return Request().request({
		url: '/user/address',
		method: 'get'
	});
}
// 帮助中心
export async function getHelp() {
	return Request().request({
		url: '/static/help/regulation',
		method: 'get'
	});
}
// 预约 时间调用
export async function getTime() {
	return Request().request({
		url: '/static/time',
		method: 'get'
	});
}
// 公告获取 
export async function getNotice() {
	return Request().request({
		url: '/static/notice/regulation',
		method: 'get'
	});
}
// 订单
export async function getOrder(type) {
	return Request().request({
		url: "user/" + type + "/order",
		method: 'get'
	});
}
